package zwz.importTask.enums;

public enum ExcelImportExportSateEnum {
    SUCCESS("A",  "全部成功"),
    PART_SUCCESS("B",  "部分成功"),
    ALL_FAIL("C",  "全部失败"),
    PROCESS("D",  "处理中");

    /**
     * 导入导出类型
     */
    private final String key;
    /**
     * 导入导出策略
     */
    private final String statusStr;
    /**
     * 菜单名称
     */

    ExcelImportExportSateEnum(String key, String statusStr) {
        this.key = key;
        this.statusStr = statusStr;
    }

    public String getKey() {
        return key;
    }


    public String getStatusStr() {
        return statusStr;
    }



    public static String getStatusStrByStatus(String status) {

        for (ExcelImportExportSateEnum task : ExcelImportExportSateEnum.values()) {
            if (task.getKey().equals(status)) {
                return task.getStatusStr();
            }
        }
        return "";
    }

}
